home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
Development
/
PowerD
/
Dmod
/
dmod_Identify
/
examples
/
myexp.d
< prev
Wrap
Text File
|
2002-10-28
|
1KB
|
38 lines
OPT DOSONLY
// A small example for using the identify.library. (C) 1997 by Richard Körber -- All Rights Reserved
// Converted by DMX in 2002.
MODULE 'exec/memory','libraries/identify','identify','libraries/configregs','libraries/configvars','utility/tagitem'
DEF IdentifyBase
PROC main()(INT)
IF IdentifyBase:=OpenLibrary('identify.library',6)
DEF expans=NIL:PTR TO ConfigDev,counter=0:UW,size:UW,unit:UW
DEF manuf[IDENTIFYBUFLEN]:CHAR,prod[IDENTIFYBUFLEN]:CHAR,pclass[IDENTIFYBUFLEN]:CHAR
PrintF('Nr Address Size Description\n'+
'----------------------------------------------------------\n');
WHILEN IdExpansionTags(
IDTAG_ManufStr ,&manuf,
IDTAG_ProdStr ,&prod,
IDTAG_ClassStr ,&pclass,
IDTAG_Expansion,&expans,
TAG_DONE)
unit:="K"
size:=expans.BoardSize>>10
IF size>=1024
unit:="M"
size := size>>10
ENDIF
PrintF('\z\d[2] \z\h[8] \z\d[3]\c \s \s (\s)\n',
++counter,
expans.BoardAddr, size, unit,
prod, pclass, manuf);
ENDWHILE
CloseLibrary(IdentifyBase)
ENDIF
RETURN 0
ENDPROC